﻿using System;
using System.Windows.Forms;

namespace OrangePrj
{
    public enum WorkType
    {
        Простая,
        ИЛИ,
        Искл_ИЛИ,
        Возврат
    }

    public enum UserCompareType
    { 
        name, 
        nameBack, 
        administration, 
        administrationBack 
    }

    public enum ManageParameters
    {
        Probability,
        Functions,
        AvailableResource
    }

    [Serializable]
    public enum Functions
    {
        Линейная,
        Показательная,
        Экспоненциальная
    }

    [Serializable]
    public enum ResourceType
    {
        Объём,
        Интенсивность
    }

    [Serializable]
    public class Resource : ICloneable
    {
        double amount;
        public ResourceType Type { get; set; }
        public double Amount
        {
            get
            {
                return amount;
            }
            set
            {
                if (value < 0) amount = 0;
                else amount = value;
            }
        }
        public Resource() { }
        public Resource(ResourceType type, double amount)
        {
            this.Amount = amount;
            this.Type = type;
        }
        public object Clone()
        {
            return new Resource(this.Type, this.Amount);
        }
    }
}